package com.thf.controller.echarts;

import com.alibaba.fastjson.JSON;
import com.thf.model.ResultData;
import com.thf.service.EchartsOneService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
public class EchartsOneController {

    @Resource
    private EchartsOneService echartsOneService;
    @RequestMapping("/back/echarts/one")
    public String findEchartsData(){
        ResultData<Map<String, Object>> data = echartsOneService.findAll();
        return JSON.toJSONString(data);
    }
}
